<?php
class UserController extends  Zgome_Controller{
	public function init(){
		parent::init();
	}
	public function loginAction(){
		if($this->_request->isPost()){
			//check validate error tu form
				$a = Zend_Auth::getInstance();
				$auth = new Zgome_Auth();
				Zend_Debug::dump($this->_request->getParams());
				
 				if($auth->login($this->_request->getParams()) == true){
 					$this->_redirect($this->_request->getHeader('referer'));
 				}
 				else echo "false";
 			}
		}
		
	public function logoutAction(){
		parent::__logout();
		$auth = new Zgome_Auth();
		$auth->logout();
		$this->_redirect($this->_request->getHeader('referer'));
	}
}